<?php

namespace App\Http\Resources\Kms\Attendance;

use App\Http\Resources\BaseResource;
use App\Models\Kms\Attendance\AttendanceDailyGatherModel;
use Illuminate\Http\Request;

class DailyFieldGroupListResource extends BaseResource
{
    /**
     * @param Request $request
     * @return array
     */
    public function toArray($request): array
    {
        return [
            "userId"             => $this->userId,
            "abnormalDays"       => $this->abnormalDays,
            "missDays"           => $this->missDays,
            "normalDays"         => $this->normalDays,
            "name"               => $this->userRel->name,
            "nickname"           => $this->userRel->nickname,
            "rootDepartmentName" => $this->userRel->rootDepartmentName,
            "jobTitle"           => $this->userRel->jobTitle,
        ]; // TODO: Change the autogenerated stub
    }
}
